import { RouteRecordRaw, createRouter, createWebHashHistory } from "vue-router";
import shareInfo from "./wx";
const routes: Array<RouteRecordRaw> = [
    {
        path: "/index",
        component: () => import("../views/Index/Index.vue"),
    },
];

const router = createRouter({
    history: createWebHashHistory(import.meta.env.BASE_URL),
    routes,
});

router.afterEach(() => {
    if (import.meta.env.MODE == "production") {
        shareInfo.init({
            title: "重磅发布 | 2023第十五届中国猎车榜奖项揭晓",
            desc: "NBD汽车（微信号：NBD-AUTO）",
            img: "http://www.nbd.com.cn/corp/20231115liechebang-m/share.png",
            shareURL: "http://www.nbd.com.cn/corp/20231115liechebang-m/#/index",
        });
    }
});

export default router;
